package com.itheima.service;

import com.alibaba.dubbo.config.annotation.Service;
import com.itheima.dao.UserDao;
import com.itheima.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Author likepei
 * @Date 2020/1/17 11:27
 * @Version v1.0
 * @Description 用户接口的实现类
 */
@Service
public class UserServiceImpl implements UserService {

    //依赖注入dao
    @Autowired
    private UserDao userDao;

    //@Transactional
    @Override
    public User findById(Integer id) {
        System.out.println("dubbo_provider2 的 dubbo协议端口号 20881");
        return userDao.findById(id);
    }
}
